#include "utils/peptidemodifier.h"
#include "utils/aminoacidinstancerbasic.h"

#include <iostream>

using namespace std;
using namespace bol;
int main(int argc, char **argv){
/*    for (int i=0; i<300; i++) {
        cerr<<i<<endl;
        Modification *m=new Modification();
    }*/
  AminoAcidInstancerBasic aainstancer;
  aainstancer.setMasses();

  ModificationDictionary dico;
  dico.put(new Modification("Cys_CAM C 57"));
  dico.put(new Modification("Oxidation HMW 16"));
  dico.put(new Modification("pouet M 100"));
  
  
  PeptideModifier peptmodifier;
  peptmodifier.setModifdico(&dico);
  
  peptmodifier.addModif(dico["Cys_CAM"], true);
  peptmodifier.addModif(dico["Oxidation"], true);
  peptmodifier.addModif(dico["pouet"], true);
  cout<<peptmodifier<<endl;

  Peptide pept("CECTIMHWDE");
  cout<<"orignal\t";
  peptmodifier.printPeptide(cout, &pept);
  cout<<"\n";
  pept.sequence()[1]=peptmodifier.charMapper()[pept.sequence()[1]][1];
  cout<<"modified\t";
  peptmodifier.printPeptide(cout, &pept);
  cout<<"\n";

  Peptide *pept2=peptmodifier.peptide("CEPHMDE", ":Cys_CAM:::Oxidation:pouet:::");
  peptmodifier.printPeptide(cout, pept2);
  cout<<"XX"<<endl;

  return 0;
}
